package com.homegoods.goods.model;

import com.homegoods.goods.item.GoodsItem;
import com.kedll.library.adapter.MultiTypeAdapter;
import com.kedll.library.mvp.BaseModel;

import java.io.Serializable;
import java.math.BigDecimal;

/**
 * @author QiQi
 * @ClassName: GoodsModel
 * @date 2018/9/18
 * @description
 */
public class GoodsModel extends BaseModel<GoodsItem> implements Serializable {
    /**
     * [{
     * "num": "1",
     * "sid": "+CqBPDnAZxdqGjRCbmzwwWSPG5czIlGZpQtmI1ErS/8AF4tlLp1DDsZNSeZP6otz",
     * "title": "三只松鼠休闲零食小吃经典长沙特产香辣味七千里臭豆腐120g/袋",
     * "SmallPic": "/upath/2018/11/6/9138114229419ufi.png",
     * "Businessman": {
     * "title": "三只老鼠",
     * "sid": "factory_4c1422f0511842189f83bcc26d0d73a5"
     * },
     * "StandardPrice": "19.8",
     * "NowPrice": "15",
     * "Inventory": "211",
     * "AboutInf": "春映梅芳风醉月，半山云影半湖烟",
     * "FixedParam": {
     * "口味": "香辣味",
     * "豆类制品": "豆干",
     * "商品毛重": "150.00g"
     * },
     * "BuyUnit": "袋",
     * "ActTag": "",
     * "Manufacturer": "0",
     * "CmdtyService": "|comclass_30cd88fdfee24485a89ad119e0d55d13|",
     * "SaleCount": "44",
     * "PayCake": "0"            * 			}
     */
    private String sid;
    private String title;
    private String num;
    private String SmallPic;
    private BigDecimal StandardPrice;
    private BigDecimal NowPrice;
    private String Inventory;
    private String AboutInf;
    private String FixedParam;
    private String BuyUnit;
    private String ActTag;
    private String Manufacturer;
    private String CmdtyService;
    private String SaleCount;
    private BigDecimal PayCake;
    private Businessman Businessman;

    public String getSid() {
        return sid;
    }

    public void setSid(String sid) {
        this.sid = sid;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getNum() {
        return num;
    }

    public void setNum(String num) {
        this.num = num;
    }

    public String getSmallPic() {
        return SmallPic;
    }

    public void setSmallPic(String smallPic) {
        SmallPic = smallPic;
    }

    public BigDecimal getStandardPrice() {
        return StandardPrice;
    }

    public void setStandardPrice(BigDecimal standardPrice) {
        StandardPrice = standardPrice;
    }

    public BigDecimal getNowPrice() {
        return NowPrice;
    }

    public void setNowPrice(BigDecimal nowPrice) {
        NowPrice = nowPrice;
    }

    public String getInventory() {
        return Inventory;
    }

    public void setInventory(String inventory) {
        Inventory = inventory;
    }

    public String getAboutInf() {
        return AboutInf;
    }

    public void setAboutInf(String aboutInf) {
        AboutInf = aboutInf;
    }

    public String getFixedParam() {
        return FixedParam;
    }

    public void setFixedParam(String fixedParam) {
        FixedParam = fixedParam;
    }

    public String getBuyUnit() {
        return BuyUnit;
    }

    public void setBuyUnit(String buyUnit) {
        BuyUnit = buyUnit;
    }

    public String getActTag() {
        return ActTag;
    }

    public void setActTag(String actTag) {
        ActTag = actTag;
    }

    public String getManufacturer() {
        return Manufacturer;
    }

    public void setManufacturer(String manufacturer) {
        Manufacturer = manufacturer;
    }

    public String getCmdtyService() {
        return CmdtyService;
    }

    public void setCmdtyService(String cmdtyService) {
        CmdtyService = cmdtyService;
    }

    public String getSaleCount() {
        return SaleCount;
    }

    public void setSaleCount(String saleCount) {
        SaleCount = saleCount;
    }

    public BigDecimal getPayCake() {
        return PayCake;
    }

    public void setPayCake(BigDecimal payCake) {
        PayCake = payCake;
    }

    public GoodsModel.Businessman getBusinessman() {
        return Businessman;
    }

    public void setBusinessman(GoodsModel.Businessman businessman) {
        Businessman = businessman;
    }

    public static class Businessman implements Serializable{
        private String title;
        private String sid;

        public String getTitle() {
            return title;
        }

        public void setTitle(String title) {
            this.title = title;
        }

        public String getSid() {
            return sid;
        }

        public void setSid(String sid) {
            this.sid = sid;
        }
    }

    @Override
    public GoodsItem createItem(MultiTypeAdapter adapter) {
        return new GoodsItem(this);
    }
}
